<?php
/**
 * Created by PhpStorm.
 * User: Wei
 * Date: 17/10/5
 * Time: 11:46
 */


//namespace cn\legendfamily\controller;

//use cn\legendfamily\db\DBHelper;

//require_once "BaseController.php";
//require_once "cn\legendfamily\db\DBHelper.php";

class IndexController extends BaseController
{
    private $dbHelper;

    public function __construct()
    {
        $this->dbHelper = new DBHelper();
    }

    public function index()
    {
//        $sql = "select * from mm_user limit 0,10";
//        $data = $this->dbHelper->select($sql);
        $data = ["tt" => "中文"];
        return $this->setSuccessDataForJson($data);
    }

    public function test()
    {
        $sql = "SELECT * FROM mm_user_work LIMIT 0,2";
        $data = $this->dbHelper->select($sql);
        return $this->setSuccessDataForJson($data);
    }

}